package day06_exception_collection.com.itheima.d4_collection_travesal;

import java.util.ArrayList;
import java.util.Collection;

public class Demo2_Collection {
    public static void main(String[] args) {
        Collection<String> list = new ArrayList<>();
        list.add("赵敏");
        list.add("小昭");
        list.add("小華");
        for (String s : list) {
            System.out.println("s = " + s);

        }

        int[] ages = {18, 19, 20, 21, 22};
        for (int age : ages) {
            System.out.println("age = " + age);
        }
    }
}
